package com.roi.model;

import java.io.Serializable;
import java.util.List;

public class Customer implements Serializable {
	private static final long serialVersionUID = 8521739786073678150L;
	private List<Account> accounts;
	private String address;
	private String name;
	private String mobNo;
	private String idNo;

	public Customer(List<Account> accounts, String address, String name,
			String mobNo, String idNo) {
		this.accounts = accounts;
		this.address = address;
		this.name = name;
		this.mobNo = mobNo;
		this.idNo = idNo;
	}

	public void changeAddress(String newAdd) {

	}

	public void changeMobNo(String num) {

	}

	public List<Account> getAccounts() {
		return accounts;
	}

	public String getAddress() {
		return address;
	}

	public String getName() {
		return name;
	}

	public String getMobNo() {
		return mobNo;
	}

	public String getIdNo() {
		return idNo;
	}

	@Override
	public String toString() {

		String result = "";
		result += "Customer: " + name + "\nID: " + idNo;
		result += "\nAddress " + address + "\nMobile: " + mobNo;
		result += "\n----------------------------------------------\n";
		for (Account ac : accounts) {
			result += ac.toString();
			result += "\n---------------------------------------------\n";
		}

		return result;
	}
}
